package com.ays.config;

import com.ays.service.SendManagerDataInfoService;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.xml.ws.Endpoint;

/**
 * @author Administrator
 * @date 2024/6/5
 * @desc webservice暴露接口
 */
@Configuration
public class CxfConfig {
    @Autowired
    private Bus bus;

    @Autowired
    private SendManagerDataInfoService sendManagerDataInfoService;

    @Bean
    public Endpoint SendManagerDataInfo() {
        EndpointImpl endpoint = new EndpointImpl(bus, sendManagerDataInfoService);
        endpoint.publish("/SendManagerDataInfo");
        return endpoint;
    }

    @Bean
    public MybatisConfiguration getMybatisConfiguration() {
        MybatisConfiguration config = new MybatisConfiguration();
        return config;
    }

}
